<!DOCTYPE html>
<html>

<head>
    <title>融享红包</title>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="${ctxPath}/assets/common/libs/layui/css/layui.css?v=${constants.getReleaseVersion()}"/>
    <link rel="stylesheet" href="${ctxPath}/assets/demos/css/gift.css?v=${constants.getReleaseVersion()}" media="all">
    <style>
        body {
            background-image: url("${ctxPath}/assets/imgs/vcode.jpg");
          /*  background-position: center 110px;*/
            background-repeat: no-repeat;
            background-size: 100%;
            background-color: #f0f2f5;
        }

		.btn-back{
			position: absolute;
			right:0px;
			top:50px;
			height:40px;
			width:100px;
			
			background-image: url("${ctxPath}/assets/imgs/btn_back.png");
		    background-repeat: no-repeat;
		    background-size: 100% 100%;
		}


		.bh-gongxi-area{
			position: absolute;
			left:0px;
			top:50px;
			height:140px;
			width:100%;
			
			background-image: url("${ctxPath}/assets/imgs/gongxi.png");
		    background-repeat: no-repeat;
		    background-size: 100% 100%;
		}
		
		
		.bh-amt-area{
			position: absolute;
			top: 35.9375%;
			left: 0px;
			font-size: 46px;
			color: white;
			width:100%;
			height: 53px;
			line-height: 53px;
			
				
			background-image: url("${ctxPath}/assets/imgs/bg_amt.png");
		    background-repeat: no-repeat;
		    background-size: 100% 100%;
		}
		
		.bh-amt-area .hb_amt {
			color:#FFFFFF; 
			text-shadow: 1px 1px #e53935,-1px -1px #e53935, 1px -1px #e53935, -1px 1px #e53935; 
			
			float: right;
			margin-right:56%;
		}
		
		.hb-code-area{
			position: absolute;
			width: 70%;
			height: 40px;
			line-height: 40px;
			right: 15%;
			top: 50%;
			background-color: #f57c00;
			border-bottom:3px solid #ff6d00;
			display: inline-flex;
		}
		
		/*
		.c-number{
		    content:url("${ctxPath}/assets/imgs/numbers.png");
			position:absolute;
			width:40px;
			height:40px;
		}
		.c-number.one{
			clip:rect(70px 330px 220px 180px);
		}
		.c-number.tow{
			clip:rect(70px 470px 220px 320px);
		}*/
		
		.hb-code-head{
			width: 50%;
			height: 40px;
			line-height: 40px;
			background-color: #f57c00;
			text-align: right;
			color: white;
			font-weight: bold;
			
		}
		.hb-code-text{
			width: 50%;
			color: #f57c00;
			background-color: #f0f2f5;
			text-align: center;
			letter-spacing:3px;
		}

        .login-header {
            color: rgba(0, 0, 0, .85) !important;
        }

        .login-footer {
            color: rgba(0, 0, 0, 0.7) !important;
        }

        .login-footer a {
            color: rgba(0, 0, 0, 0.7) !important;
        }

        .login-footer a:hover {
            color: rgba(0, 0, 0, 0.4) !important;
        }
    </style>
    <script>
        if (window != top)
            top.location.replace(location.href);
    </script>
</head>

<body>
<div class="login-wrapper">

<!-- 
	 <div class="btn-back">
	 </div>
-->
	 <div class="bh-gongxi-area">
	 	
	 </div>
	 
	 <div class="bh-amt-area numbers">
	 	<!-- 
	 	<i class="c-numbers one"></i>
	 	<i class="c-numbers tow"></i>
	 	 -->
	 	<b><span class="hb_amt" id="hb_amt_id"></span></b>
	 </div>
	
	 <div class="hb-code-area">
	 	<div class="hb-code-head">
	 		红包口令：
	 	</div>
	 	<div class="hb-code-text">
	 		<span class="code" id="dl-hb-code"></span>
	 	</div>
	 	
	 </div>
<!--
	 <div class="get-hongbao">
	 	复制红包口令登录融享财富公众号留言口令领取您的专属红包
	 </div>
	   -->

</div>

@/* 加入contextPath属性和session超时的配置 */
<script type="text/javascript">
    var Feng = {
        ctxPath: "${ctxPath}",
        version: '${constants.getReleaseVersion()}'
    };
</script>
<script type="text/javascript" src="${ctxPath}/assets/common/libs/layui/layui.js?v=${constants.getReleaseVersion()}"></script>
<script type="text/javascript" src="${ctxPath}/assets/common/js/common.js?v=${constants.getReleaseVersion()}"></script>

<script>
    layui.use(['layer', 'form', 'index', 'ax'], function () {
        var $ = layui.jquery;
        var $ax = layui.ax;
        var layer = layui.layer;
        var form = layui.form;
        var index = layui.index;

        var funs = {};
        
        funs.getUrlRawParam = function (name) {
            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
            var r = window.location.search.substr(1).match(reg);
            if (r != null) {
                return r[2];
            } else {
                return null;
            }
        };
        
        var zhParam = funs.getUrlRawParam("param");
  		console.log("param:"+zhParam);
  		
  		/*
        var userId = Feng.getUrlParam("userId");
        if(userId==null || userId == ""){
        	 layer.msg("你没有领取红包权限", {icon: 5, anim: 6});
        	return;
        }*/
        
        
        var getHongbao = function(){
        	 var ajax = new $ax(Feng.ctxPath + "/mappApi/applayVerifCode", function (data) {
        		 
        		 console.log(data);
        		 if(data.code ==200){
        			 $('#dl-hb-code').text(data.data.vcode);
        			 var amt = data.data.hbnum/100;
        			 amt = "" + amt;
        			 if(amt.length==1)
        				 amt+= ".00";
        			 if(amt.length==2)
        				 amt+= ".0";
            		 $('#hb_amt_id').text(amt);
        		 }else{
        			 layer.msg("获取失败！" + data.message, {icon: 5, anim: 6});
        		 }
                // Feng.success("登录成功!");
             }, function (data) {
                 layer.msg("获取失败！" + data.message, {icon: 5, anim: 6});
             });
        	 
        	 if(zhParam!=undefined){
        	  	 ajax.set("param", zhParam);
        	 }
        	 ajax.start();
        }
        
        
        getHongbao();
        
        
        
        $('.btn-back').click(function () {
        	history.back(-1);//直接返回当前页的上一页，数据全部消息，是个新页面
        	//history.go(-1);//也是返回当前页的上一页，不过表单里的数据全部还在
        });
        
        $('.hb-code-text').click(function () {
        	var txt = $('#dl-hb-code').text();
        	
            Copy(txt);
           // console.log("copy code:"+txt);
        })
        
       // 复制微信号函数
       function Copy(str) {
    	   	var save = function(e) {
    	   		e.clipboardData.setData('text/plain', str);
    	   		e.preventDefault();
    	   	};
    	   	document.addEventListener('copy', save);
    	   	document.execCommand('copy');
    	   	document.removeEventListener('copy', save);
    	   	//console.log('复制成功');
    	    //layer.msg('成功复制:'+str);
       }
        
    });
</script>


</body>
</html>